package com.leador.socket;

import android.util.Log;

/**
 * Created by liuha on 2016/9/14.
 */
public class SocketThread extends Thread {
    private SocketMananger socketMananger = null;
    private boolean connectEnable = true;
    public SocketThread(SocketMananger socketMananger){
        this.socketMananger = socketMananger;
    }
    @Override
    public void run() {
        super.run();
        while (connectEnable){
            //释放
            socketMananger.disconnect();
            //链接
            socketMananger.connect();
        }
    }

    public void setConnectEnable(boolean connectEnable) {
        this.connectEnable = connectEnable;
    }

    //--------------------------------socket重连接-------------------------------------------------------------

}
